package com.dehui.traders.ui.viewmodle;

import android.content.Context;
import android.os.Bundle;

import com.dehui.traders.bean.StrategyBean;
import com.dehui.traders.ui.fragment.StrateDetailFragment;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.binding.command.BindingCommand;
import me.goldze.mvvmhabit.utils.ToastUtils;
import rx.functions.Action0;

/**
 * Created by hqq on 18.3.30.
 */

public class StrateItemViewModel extends BaseViewModel{

    public StrategyBean entity;

    public StrateItemViewModel(Context context,StrategyBean entity){
        super(context);
        this.entity = entity;
    }

    public BindingCommand itemClick = new BindingCommand(()->{
        Bundle bundle = new Bundle();
        bundle.putString(StrateDetailFragment.IntentKey_StrateName,entity.name);
        startContainerActivity(StrateDetailFragment.class.getCanonicalName(),bundle);
    });

}
